package cn.heyige.backend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("share")
public class ShareDO {
    
    @TableId(type = IdType.AUTO)
    private Integer id;
    
    @TableField("user_id")
    private Integer userId;
    
    @TableField("view_count")
    private Integer viewCount;

    @TableField("share_code")
    private String shareCode;

    @TableField("title")
    private String title;
    
    @TableField("content")
    private String content;

    @TableField("platform")
    private String platform;

    @TableField("reward_quota")
    private Integer rewardQuota = 0;
    
    @TableField("is_active")
    private Boolean isActive = true;
    
    @TableField("share_time")
    private LocalDateTime shareTime;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}